<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> 后台管理开发框架</title>
<link href="/favicon.ico" rel="icon">
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="/static/admin/layui/css/layui.css" rel="stylesheet" type="text/css" />
<link href="/static/admin/css/style.css" rel="stylesheet" type="text/css" />
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- 重定位style -->
<style>
.layui-table-cell {height: 35px;line-height: 35px;}
.layui-table, .layui-table-view{margin-top: 0px;}
</style>
<div class="layui-fluid">
    <div class="layui-card">
        <!-- // 默认操作按钮 -->
        <div class="layui-card-header layuiadmin-card-header-auto ">
			<div class="layui-form">
				<div class="layui-form-item">
				<div class="layui-inline">
					<div class="layui-input-inline">
						<select name="status">
							<option value="">按状态查询</option>
							<option value="2" >正常</option>                                 
							<option value="1" >关闭</option>             
						</select>
					</div>  
				</div>
					
				<div class="layui-inline">
					<div class="layui-form-label">栏目名称</div>
					<div class="layui-input-inline "><input name="title" class="layui-input" type="text" placeholder="栏目名称"/></div>
				</div>


				<div class="layui-inline">
					<div class="layui-form-label">模型名称</div>
					<div class="layui-input-inline "><input name="model" class="layui-input" type="text" placeholder="模型名称"/></div>
				</div>
				<div class="layui-inline" >
					<!-- // 默认搜索 -->
					<button class="layui-btn icon-btn" lay-filter="formSearch" lay-submit>
						<i class="layui-icon layui-icon-search"></i>搜索
					</button>

					<!-- // 打开添加页面 -->
					<button class="layui-btn icon-btn" lay-open="" lay-area="100%,100%" lay-offset="0px" lay-maxmin="true" lay-url="/view/system/category/add" >
						<i class="layui-icon layui-icon-add-1"></i>添加
					</button>
				</div>
				</div>
			</div> 
        </div>

        <!-- // 创建数据表实例 -->
        <table class="layui-hide" id="tableList" lay-filter="tableList"></table>        
    </div>
</div>

<!-- // 列表状态栏 -->
<script type="text/html" id="columnStatus">
    <input type="checkbox" lay-filter="switchStatus" lay-url="/view/system/category/status" value="{{d.id}}" 
    lay-skin="switch" {{d.status==1?'checked':''}}  />
</script>
 
<!-- 表格操作列 -->
<script type="text/html" id="toolBar">
	<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="edit" title="编辑"><i class="layui-icon">&#xe630;</i>编辑</a>
	<a class="layui-btn layui-btn-xs" lay-event="del" title="删除"><i class="layui-icon">&#xe630;</i>删除</a>
</script>

<script src="/static/admin/layui/layui.js?v=1.0.0"></script>
<script src="/static/admin/js/common.js?v=1.0.0"></script>
<script>

	layui.use(['func'], function () {
        var func = layui.func,$ = layui.$;
		var cols = [
			{type: 'checkbox', width:45},
			{field: 'id', align: 'center',sort: true,width: 80,  title: 'ID'},
			{field: 'title', align: 'left',width:250,templet:function(d){
				var left = d._level * 32;
				var html = '<div style="padding-left:'+ left + 'px;">';
					html += (d._level >= 1) ? '|-' + d.title : d.title;
					html += ' </div>';
				return html
			}, title: '名称'},
			{field: 'channel', align: 'center',width:180,title: '模型'},
			{field: 'sort', sort: true,align: 'center',width:180,  title: '排序'},
			{field: 'status', align: 'center',width:180, templet: '#columnStatus', title: '状态'},
			{field: 'pinyin', align: 'center',width:180, title: '英文名'},
			{field: 'skin', align: 'center', width:180, title: '分类页'},
			{minWidth: 180, title: '功能操作', align: 'center', toolbar: '#toolBar'}
		];

		//【渲染TABLE】
		func.tableIns(cols, "tableList");
		//【设置弹框】
		func.setWin("订单管理");
        
    });
</script>
